Developer Documentation
PATH  Mac OS X Documentation > Developer Tools > The Objective-C Compiler


Previous | Contents | Next

Identifying the Compiler Version

The compiler has additional predefined macros that can be used to determine the release version of the compiler (these macros are not available on Windows NT). Every effort should be made to minimize the use of these macros. For each release of the compiler there will be a macro defined such as NX_COMPILER_RELEASE_3_0 and NX_COMPILER_RELEASE_3_1 . There will also be a macro NX_CURRENT_COMPILER_RELEASE . One can conditionally compile code by numerically comparing these macros. For example:

#if NX_CURRENT_COMPILER_RELEASE > NX_COMPILER_RELEASE_3_0 ... #endif


The Objective-C Compiler

Previous | Contents | Next